Skip to content
This repository has been archived by the owner on Apr 24, 2019. It is now read-only.

Fix irq contexts #31

Merged
merged 2 commits into from
Aug 24, 2016
Merged

Fix irq contexts #31

merged 2 commits into from
Aug 24, 2016

Conversation

geky
Copy link
Contributor

@geky geky commented Aug 24, 2016

Should resolve ARMmbed/mbed-os-example-client#75

mbed-client defines M2MConnectionHandlerPimpl::socket_event for handling the event passed through the UDPSocket::attach function. Unfortunately, the previous implementation contained both a tr_debug call and malloc call that were unacceptably long-running and caused UART bytes to be dropped.

This issue was not unnoticable in lwip's implementation. We could update lwip to dispatch events in a critical section, insuring correct behaviour, although this would introduce unnecessary jitter in existing code.

moved from ARMmbed/mbed-os#2530
cc @yogpan01, @jupe

During debugging, the tr_debug call in M2MConnectionHandlerPimpl::socket_event
took an unacceptable amount of time to complete, causing bytes traveling
through the serial connections to be dropped.

This was unnoticable in lwip's network-socket implementation due to not
occuring in an interrupt context, but prevented the esp8266 from working
correctly.
Replaced malloc calls in interrupt contexts with allocations from a
local memory pool using rtos::MemoryPool
@teetak01
Copy link
Contributor

rebuild

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't register mbed-client object successfully through WiFi
3 participants